package com.hzspace.client;

import com.hzspace.jar.MollyBoxThreadPool;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@SpringBootApplication
public class ClientApplication {

    public static void main(String[] args) {
        SpringApplication.run(ClientApplication.class, args);
    }

    @Resource
    private MollyBoxThreadPool mollyBoxThreadPool;


    @GetMapping("/test")
    public void test() throws InterruptedException {
        mollyBoxThreadPool.submit(() -> {
            System.out.println("...");
        });
        Thread.sleep(1000000);
    }

}
